#ifndef MOVINGOBJECT_H
#define MOVINGOBJECT_H

#include <QGraphicsWidget>
#include <QPainter>
#include <QRect>
#include <QRectF>
#include <QStyleOptionGraphicsItem>
#include <QWidget>
#include <QPointer>
#include <QDebug>

class DynamicValue;

class MovingObject : public QGraphicsWidget
{
    Q_OBJECT
public:
    explicit MovingObject(QGraphicsItem *parent = 0);
    ~MovingObject();

    QRectF boundingRect() const;
    QPainterPath shape() const;
    void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
               QWidget *widget);

    void target( float x, float y );
    bool isTargeting;

    DynamicValue* dynX;
    DynamicValue* dynY;
    DynamicValue* dynWidth;
    DynamicValue* dynHeight;

    QRectF centerXCenterYRect();
    QRectF centerXTopYRect();
    QRectF leftXCenterYRect();
    QRectF leftXTopYRect();

signals:
    
public slots:
        void advance();
    
};

#endif // MOVINGOBJECT_H
